:root {
  --chevron-offset: 16px;
  --chevron-animation-offset: 2px;
}

.send-files-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* prevents children elements of overlay to trigger onDragLeave */
/* https://stackoverflow.com/a/18582960/9999202 */
.send-files-overlay * {
  pointer-events: none;
}

.send-files-overlay.visible {
  opacity: 1 !important;
}

.send-files-overlay.hidden {
  opacity: 0;
}

.send-files-overlay-container {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  max-width: 90%;
  word-break: break-word;
}

.send-files-overlay-content {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--swm-debugger-label);
  flex-direction: column;
  border-radius: 20px;
  gap: 8px;
  padding: 24px 32px;
}
.send-files-overlay-content.breathe {
  animation: breathe 2s infinite ease;
}

.send-files-overlay.success .send-files-overlay-content {
  border-color: var(--vscode-testing-iconPassed);
  background-color: rgba(115, 201, 145, 0.1);
  animation: successPulse 0.6s ease-out;
}

.send-files-overlay.success .send-files-overlay-content p {
  color: var(--vscode-testing-iconPassed);
}

.send-files-overlay.error .send-files-overlay-content {
  text-align: center;
  border-color: var(--vscode-testing-iconFailed);
  background-color: rgba(255, 76, 76, 0.1);
  animation: errorShake 0.6s ease-out;
}

.send-files-overlay.error .send-files-overlay-content p {
  color: var(--vscode-testing-iconFailed);
}

.success-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.error-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.success-checkmark {
  color: var(--vscode-testing-iconPassed) !important;
  scale: 1.5 !important;
  transform: none !important;
  animation: checkmarkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.error-icon {
  color: var(--vscode-testing-iconFailed) !important;
  scale: 1.5 !important;
  transform: none !important;
  animation: errorPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--vscode-charts-green-rgb, 22, 122, 51), 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(var(--vscode-charts-green-rgb, 22, 122, 51), 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--vscode-charts-green-rgb, 22, 122, 51), 0);
  }
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

@keyframes errorShake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(2px);
  }
  75% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes errorPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes breathe {
  0% {
    scale: 1;
  }
  50% {
    scale: 1.02;
  }
  100% {
    scale: 1;
  }
}

.send-files-overlay-content p {
  margin: 0;
  color: var(--swm-debugger-label);
  text-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.send-files-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.send-files-icon span.rotate {
  transform: rotate(-90deg);
}
.send-files-icon span {
  color: var(--swm-debugger-label);
  scale: 1.3;
  transform: translateX(-0.5px);
  text-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
